package com.lianyi.login.mvp.ui.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lianyi.commonsdk.util.GlideUtils;
import com.lianyi.login.mvp.model.entity.DoctorListBean;
import com.lianyi.module_login.R;

import java.util.List;



/**
 * Created by leilei on 2018/7/23.
 */

public class DoctorListAdapter extends BaseQuickAdapter<DoctorListBean, BaseViewHolder> {
    public DoctorListAdapter(int layoutResId, @Nullable List<DoctorListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, DoctorListBean item) {
        holder.setText(R.id.tv_name, item.getName());
        ImageView imageView = holder.getView(R.id.iv_avatar);
        GlideUtils.showImage(imageView, item.getPhoto());
    }
}
